import request from "@/util/request";

export default {
    //查询所有员工
    findALLEmployees()
    {
        return request({
            url:"/employee/list",
            method:"get"
        })
    },
    // 分页查询
    findByPage(page,pageSize){
        return request({
            url:`/employee/findByPage/${page}/${pageSize}`,
            method:"get"
        })
    },
    // 条件分页查询
    search(page,pageSize,data){
        return request({
            url:`/employee/search/${page}/${pageSize}`,
            method:"post",
            data
        })
    },
    //删除员工
    deleteEmployee(ids){
        return request({
            url:`/employee/delete/${ids}`,
            method:"delete"
        })
    },
    //添加和保持员工都通过该URL
    save(url,method,data){
        return request({
            url,
            method,
            data
        })
    },
}